CREATE TABLE [dbo].[TCREPO_COMP]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[ST_COMP] [dbo].[TD_VC_001] NOT NULL,
[NU_PLAN] [dbo].[TD_VC_008] NOT NULL,
[DE_PLAN] [dbo].[TD_VC_050] NULL,
[ST_PROV] [dbo].[TD_VC_001] NULL,
[CO_PROV] [dbo].[TD_VC_020] NULL,
[ST_CLIE] [dbo].[TD_VC_001] NULL,
[CO_CLIE] [dbo].[TD_VC_020] NULL,
[DE_TIPO_COMP] [dbo].[TD_VC_200] NULL,
[FE_INIC] [dbo].[TD_DT_001] NULL,
[FE_FINA] [dbo].[TD_DT_001] NULL,
[ST_MONE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TCREPO_CO__ST_MO__056ECC6A] DEFAULT ('N'),
[DE_DATO_MONE] [dbo].[TD_VC_200] NULL,
[DE_TIPO_OPER] [dbo].[TD_VC_200] NULL,
[DE_CAMP_VISU] [dbo].[TD_VC_200] NULL,
[ST_FACT_CAMB] [dbo].[TD_VC_001] NULL,
[ST_IMPT] [dbo].[TD_VC_001] NULL,
[ST_TIPO_OPER] [dbo].[TD_VC_001] NULL,
[ST_NUME_CUOT] [dbo].[TD_VC_001] NULL,
[ST_UNID_CNTB] [dbo].[TD_VC_001] NULL,
[ST_OBSE] [dbo].[TD_VC_001] NULL,
[TI_SITU] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCREPO_CO__CO_US__075714DC] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCREPO_CO__FE_US__084B3915] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCREPO_CO__CO_US__093F5D4E] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCREPO_CO__FE_US__0A338187] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCREPO_COMP] WITH NOCHECK ADD CONSTRAINT [CK__TCREPO_CO__ST_MO__0662F0A3] CHECK NOT FOR REPLICATION (([ST_MONE]='N' OR [ST_MONE]='S'))
GO
ALTER TABLE [dbo].[TCREPO_COMP] ADD CONSTRAINT [PK__TCREPO_C__BC5E513653ED4AC6] PRIMARY KEY CLUSTERED  ([CO_EMPR], [ST_COMP], [NU_PLAN]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCREPO_COMP] ADD CONSTRAINT [FK__TCREPO_CO__CO_EM__1E3B458B] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
